package thesis.database;

import java.util.Date;
import java.util.List;

import javax.sql.DataSource;


public interface ServiceDAO {
	/**
	 * This is the method to be used to initialize database resources ie.
	 * connection.
	 */
	public void setDataSource(DataSource ds);

	/**
	 * This is the method to be used to create a record in the Service table.
	 */
	public int create(Service service);
	
	public int createReturnId(Service service);

	/**
	 * This is the method to be used to list down a record from the Service
	 * table corresponding to a passed Service id.
	 */
	public Service getService(Integer id);

	/**
	 * This is the method to be used to list down all the records from the
	 * Service table.
	 */
	public List<Service> listServices();

	/**
	 * This is the method to be used to delete a record from the Service table
	 * corresponding to a passed Service id.
	 */
	public void delete(Integer id);

	/**
	 * This is the method to be used to update a record into the Service table.
	 */
	public void update(Service service);
	
	public Service getServiceByPhone(String phone);

}
